using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class FMS_StationDailyFinanceDetailsMap : EntityTypeConfiguration<FMS_StationDailyFinanceDetails>
	{
		public FMS_StationDailyFinanceDetailsMap()
		{
			// Primary Key
			this.HasKey(t => t.ID);

			// Properties
			this.Property(t => t.ReplaceTypeName)
				.HasMaxLength(20);
				
			this.Property(t => t.WaybillType)
				.HasMaxLength(20);
				
			this.Property(t => t.StatusName)
				.HasMaxLength(20);
				
			this.Property(t => t.AcceptType)
				.HasMaxLength(20);
				
			this.Property(t => t.RejectReason)
				.HasMaxLength(500);
				
			this.Property(t => t.ResortReason)
				.HasMaxLength(500);
				
			this.Property(t => t.DeliverManName)
				.HasMaxLength(20);
				
			this.Property(t => t.Comment)
				.HasMaxLength(20);
				
			this.Property(t => t.Status)
				.IsRequired()
				.HasMaxLength(20);
				
			this.Property(t => t.PosNum)
				.HasMaxLength(200);
				
			this.Property(t => t.CustomerOrder)
				.HasMaxLength(20);
				
			this.Property(t => t.ExpandField)
				.HasMaxLength(200);
				
			// Table & Column Mappings
			this.ToTable("FMS_StationDailyFinanceDetails");
			this.Property(t => t.ID).HasColumnName("ID");
			this.Property(t => t.EnterTime).HasColumnName("EnterTime");
			this.Property(t => t.WaybillNO).HasColumnName("WaybillNO");
			this.Property(t => t.ReplaceTypeName).HasColumnName("ReplaceTypeName");
			this.Property(t => t.NeedPrice).HasColumnName("NeedPrice");
			this.Property(t => t.NeedReturnPrice).HasColumnName("NeedReturnPrice");
			this.Property(t => t.PriceDiff).HasColumnName("PriceDiff");
			this.Property(t => t.PriceReturnCash).HasColumnName("PriceReturnCash");
			this.Property(t => t.Weight).HasColumnName("Weight");
			this.Property(t => t.WaybillType).HasColumnName("WaybillType");
			this.Property(t => t.StatusName).HasColumnName("StatusName");
			this.Property(t => t.AcceptType).HasColumnName("AcceptType");
			this.Property(t => t.RejectReason).HasColumnName("RejectReason");
			this.Property(t => t.ResortReason).HasColumnName("ResortReason");
			this.Property(t => t.PostTime).HasColumnName("PostTime");
			this.Property(t => t.DeliverManName).HasColumnName("DeliverManName");
			this.Property(t => t.Comment).HasColumnName("Comment");
			this.Property(t => t.Status).HasColumnName("Status");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.StationID).HasColumnName("StationID");
			this.Property(t => t.Sources).HasColumnName("Sources");
			this.Property(t => t.MerchantID).HasColumnName("MerchantID");
			this.Property(t => t.OPType).HasColumnName("OPType");
			this.Property(t => t.PosNum).HasColumnName("PosNum");
			this.Property(t => t.LmsId).HasColumnName("LmsId");
			this.Property(t => t.DeductMoney).HasColumnName("DeductMoney");
			this.Property(t => t.CustomerOrder).HasColumnName("CustomerOrder");
			this.Property(t => t.DailyTime).HasColumnName("DailyTime");
			this.Property(t => t.ExpandField).HasColumnName("ExpandField");
		}
	}
}

